# name : ggplot2 spaghetti template
# key : ggplot2.spaghetti.template
# key : spaghetti.template#ggplot2
# contributor: Shuguang Sun
# --
Spaghettidt

Spaghettidt_bsl

ggplot(Spaghettidt,
       aes(x = tumorday, y = suvmaxpct, group = SUBJID)) +
  geom_line(aes(colour = ARMNAM)) +
  geom_point(aes(shape = SUBJID)) +
  geom_hline(yintercept = -30, col = "#999999", linetype = "longdash", lwd = 1) +
  geom_text(data = Spaghettidt_bsl,
            aes(x = tumorday + 3, y = suvmaxpct, label = sprintf("Bsl: %3.1f", suvmaxbsl), hjust = "left"), size = 3) +
  scale_shape_manual(values = 1:24) +
  scale_colour_manual(values=RColorBrewer::brewer.pal(4, "Dark2")) +
  labs(fill="剂量组", colour="剂量组", shape="受试者编号",
       x="时间（天）", y="SUV Max 相对基线变化 (%)"
       ## title="Swimmer Plot"
       ) +
  theme_ipsum_ps(
    ## base_family = font_rc,
    axis_title_just = "c",
    axis_title_size = 11.5,
    ## grid = "X",
    ## axis_title_family = font_rc
    ) +
  theme(legend.position = 'bottom', legend.box = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 0.5)
        legend.key.size=unit(0.5, "cm"),
        legend.text=element_text(size=8),
        legend.title=element_text(size=8),
        legend.spacing=unit(0.05, "lines"))
